import request from '@/utlis/request'

// 查询用户及关联地址
export function getList() {
    
    return request({
        url: '/getUser',
    })
}


// 搜索
export function getUserById(params) {
    return request({
        url: '/getUserById/'+params,
    })
}

//删除
export function delLink(id) {
    return request({
        url: '/dele/' + id,
        method: 'delete',
    })
}

//修改
export function updateLink(editList) {
    return request({
        url: '/updates',
        method: 'put',
        data:editList,
    })
}

//新增用户及关联地址
export function addLink(data) {
    return request({
        url: '/addUser',
        method: 'post',
        data,
    })
}
//新增用户地址
export function addAddresList(data) {
    return request({
        url: '/addAddressList',
        method: 'post',
        data,
    })
}

//查询全部用户信息
export function getUserList() {
    return request({
        url: '/getUserList',
        method: 'get',
    })
}